<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Document</title>
    <link rel="stylesheet" href="../../css/api.css">
    <link rel="stylesheet" href="../../css/aui_font.css">
    <link rel="stylesheet" href="../../css/news.css">
    <link rel="stylesheet" href="../../css/frame2.css">
    <style>
        .wrap .u-wrap .list {
            font-size: 14px;
            color: #333333;
        }

        .wrap .u-wrap .list .name {
            color: #F46CEF;
            font-size: 14px;
            margin-right: 5px;
        }

        .wrap .u-wrap .list .content {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .wrap .u-wrap .list .footer {
            font-size: 12px;
            color: #757575;
            margin-top: 10px;
        }
    </style>
</head>

<body>
    <div class="wrap" id="view" v-cloak>
        <ul class="u-wrap">
            <li class="list" v-for="(m, index) in ffList" @click="openDy(index)">
                <div class="tx img-h">
                    <img :src="returnImg(m.head)" onerror="this.src='../../image/touxiang.png'" alt="">
                </div>
                <div class="content">
                    <div class="name-wrap" style="position: relative;">{{m.desc}}</div>
                    <div class="flex-bt footer">
                        <span class="time">{{m.addtime}}</span>
                        <div class="look"><span>{{_i18n('去看看')}}</span> <i class="aui-iconfont aui-icon-right"></i></div>
                    </div>
                </div>
            </li>
            <!-- <li class="list" v-for="(m, index) in ffList">
                <div class="tx img-h">
                    <img :src="returnImg(m.head)"  onerror="this.src='../../image/touxiang.png'" alt="">
                </div>
                <div class="content">
                    <div class="name-wrap" style="position: relative;"><span class="name">{{m.name}}</span>在广州事发布萨卡就发发了身份卡艰苦奋斗积分</div>
                    <div class="flex-bt footer">
                        <span class="time">{{m.addtime}}</span>
                        <div class="look"><span>去看看</span> <i class="aui-iconfont aui-icon-right"></i></div>
                    </div>
                </div>
            </li> -->
            <!-- <li class="list">
                <div class="tx img-h">
                    <img src="../../image/test/01.jpg" alt="">
                </div>
                <div class="content">
                    <div class="name-wrap" style="position: relative;"><span class="name">张三</span>在广州事发布萨卡就发发了身份卡艰苦奋斗积分</div>
                    <div class="flex-bt footer">
                        <span class="time">2020-02-12</span>
                        <div class="look"><span>去看看</span> <i class="aui-iconfont aui-icon-right"></i></div>
                    </div>
                </div>
            </li> -->
        </ul>
        <div id="no_more" :class="{'null': ffList.length == 0}"></div>
    </div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/jquery.js"></script>
<script src="../../script/ffkj.js"></script>
<script src="../../script/vue.js"></script>

<script>
    var view = new Vue({
        el: '#view',
        data: {
            imgurl: imgurl,
            ffList: [],
            ffInfo: {},
        },
        methods: {
            // 点击相关内容
            openDy(index) {
                var _this = this;
                var data = _this.ffList[index];
                if (data.leixing == 3) {
                    showDetail('frame1/link_modal', {
                        uid: data.id,
                        type: 1
                    })
                } else {
                    _url({
                        id: data.dy_id,
                        url: 'frame1/dy_detail',
                        title: '详情'
                    })
                }
            },
            _url(param, url) {
                _url(param, url);
            },
            // 返回图片路径
            returnImg(url) {
                return returnImg(url);
            },
            
        }
    })

    apiready = function () {
        // var param = {
        //     user_id: $api.getStorage('userid'),
        // }
        // _shangla(function () {
        //     _lists('home/User/sysDymanic', 0, 1, param);
        // })

        // _scrollToBottom(function () {
        //     if (heigutgao == 1) {
        //         pagenum++;
        //         _lists('home/User/sysDymanic', pagenum, '', param);
        //     }
        // })

        getData()
    }

    // 获取电台广播消息列表
    function getData() {
        _ajax('home/User/sysDymanic', function (ret, err) {
            if (ret && ret.data) {
                view.ffList = ret.data;
            }
        }, {
            user_id: $api.getStorage('userid'),
        })
    }
</script>

</html>